check if the errors array is empty and not the string 'errors'