NULL is a pointer that points at nothing. Reading through it is undefined behavior: on a real system the program usually crashes, and in this workspace it stops and names the line. A function that may receive NULL, such as an optional input, must check before it dereferences.
const makes a promise. const char *s means the function will not change the characters, and the compiler enforces it, so callers can pass string literals and read-only data safely. A function that returns a string literal, such as "BUY", returns const char *, because literals must never be modified.
Copy functions usually take a destination without const and a source with it, which documents the direction of the copy in the signature.
Check for NULL before reading through the pointer.