Adding cehck for array_key