Avoiding null pointer exceptions.