Fix NullPointer on check.