Checks for nullpointers.