License exception fix when info is not available

Fellow Hampei,

I’ve fixed an exception in license parse logic which happens when information on AppLicense (that is optional and not always available) makes your gem useless. 

According to the information on RM Unify Dashboard for SSO, the following parameters are optional and not always available on callback page: 

AppLicence  	http://schemas.rm.com/identity/claims/applicence
AppEstablishmentKey  	http://schemas.rm.com/identity/claims/appestablishmentkey
AppUserId  	http://schemas.rm.com/identity/claims/appuserid

As a result of this, Rails raises exception on line 43 of your code:
licence = Hash[licence_str[1..-2].split('|').map{|kv|

This commit fixes it.

If you need more information or full log that contains exception, feel free to drop me a line.

P.S. This code is probably not 100% perfect and I assume that there would be a more elegant solution. I'm relatively new to Ruby On Rails and study it ATM.

Thanks!
This doesn't work
I wrote like this:
def licence
        licence_str =  @attributes['http://schemas.rm.com/identity/claims/applicence']
        return nil unless licence_str.nil? || licence_str.empty?
        licence = Hash[licence_str[1..-2].split('|').map{|kv|
          (k,v) = kv.split(':')
          [k.underscore, v]
        }]
        licence['is_trial'] = licence['is_trial'] == 'True'
        licence['is_connector'] = licence['is_connector'] == 'True'
        licence.merge!(licence_description(licence))
      end
and got the same exception

while this fix works like a charm:
def licence
        licence_str =  @attributes['http://schemas.rm.com/identity/claims/applicence']
        unless licence_str.nil?
          licence = Hash[licence_str[1..-2].split('|').map{|kv|
            (k,v) = kv.split(':')
            [k.underscore, v]
          }]
          licence['is_trial'] = licence['is_trial'] == 'True'
          licence['is_connector'] = licence['is_connector'] == 'True'
          licence.merge!(licence_description(licence))
        end
      end

I understand what you are trying to do - return from the function code if licence_str is nill
But for some reason it continues the execution of ruby code further and I'm getting same exception