diff --git a/lib/devise_invitable/model.rb b/lib/devise_invitable/model.rb
index <HASH>..<HASH> 100644
--- a/lib/devise_invitable/model.rb
+++ b/lib/devise_invitable/model.rb
@@ -218,7 +218,7 @@ module Devise
           invite_key_array = invite_key_fields
           attributes_hash = {}
           invite_key_array.each do |k,v|
-            attributes_hash[k] = attributes.delete(k).strip
+            attributes_hash[k] = attributes.delete(k).try(:strip)
           end
 
           invitable = find_or_initialize_with_errors(invite_key_array, attributes_hash)
fix failing test, avoid calling strip on nil