Fixed case-sensitivity bug in dealing with \'NULL' JSON ref

See in-code comments