Null check added