correctly check for array like input