check for array type instead of length, fixes #78