Simplified rational type test in constructor