added hash and array type checks