Improve string_to_elixir_types/1 with guards