Add null pointer checker