fix validation if string is nil
fix end_with with other approach
Merge pull request #3 from schasse/fix_end_with

fix validation if string is nil