Using default #to_json for String, NilClass and Hash

Related to #7.