Check expected type after JSON decode instead of checking what is not expected.

This will also allow "true" and "false" as filenames instead of only "null".
Merge pull request #4340 from owncloud/true-false-as-filename

Allow true and false as filenames.