Intuitive JavaScript type coercion and data cleanup