Lets be careful not to deref nil

Just some additional safety.