better type handling for bool/double params