added nullpointer and empty string fix when linkifying
changed from commit to commitAllowingStateLoss