Check to see if String object responds to encode before attempting
Merge pull request #6 from darksheik/check_encode

Check to see if String object responds to encode before attempting