fixed null pointer exception

and .equals(null) which doesn’t work