Fix cases where API allows null inputs

+ Add check for NULL in JSON::Parse
+ Add check for NULL in JSON::SkipWhitespace

Rationale: 
1. strlen(NULL) is undefined behaviour.
2. malloc(NULL) is implementation dependent (i.e. non-portable) and may crash.
3. Dereferencing a null pointer is undefined behaviour.