Removed Nullpointer and optimized the Regex
Removed Nullpointer and optimized the Regex