fix syntax for array check