isAN() function added with some test cases implemented in mocha.