Improved type conversion for select field