added/fixed tests and re-ordered _is_mixed_type check