Remove =null from var check function