handle empty strings properly in float conversion