Fix possible nullpointer