type check / conversion for number param