Erlang input validation and normalization utilities