Null check when setting value