Removing null pointer exceptions.