null check for Object.keys