If the case clauses check for 'undefined', probably better not to default the get_ne_binary/3 to <<>>. Just call arity-2 version.