Whitelist null_pointer error so that custom entities with spaces in the name that don't exist are considered non existent. Also, URI encode the entity name.
Merge pull request #6 from mdobson/fix-null-pointer-error

Whitelist null_pointer error so that custom entities with spaces in the ...