Filter An Array With Multiple Conditions In If Statement