Add casting to null
Fix bug introduced with last push

Only cast to null if type has null and IS null
Otherwise, 0 will be cast to null if type is ["number", "null"]