Null exceptions

Check for nulls