Corrected wrong usage of pattern matching operator. Before =~ was used for checking whether a pattern matches or not but for this case === is the right operator.