@stof I added this additional conditions after one of previous hints here, That I should add them there to avoid unnecessary in_array check