Refactored the isUpper and isLower code

Added new test cases and also added the comments to the test.js file