Move jsonlike methods to thier own module.

Support null and 'undefined'