Found the cause of a nullpointer
Added an error in case of more once nullpointers