Temporary fix for a rails bug

Sometimes NameError#name returns nil due to https://github.com/rails/rails/pull/15162
Just skip finding in case name is nil.