Fixed nullcheck