Null checks and stuff.