param check bugfix

line 98, null is also an object