fixed Null check