Yoda style check to avoid null assignment