Code cleanup
1. Change call to size() to isEmpty()
2. Moved comments in a separate line from the code and removed those that are unnecessary
3. Return result immediately instead of using a temporary variable
4. Log original exception in catch statement
5. Simplify try block to only include those that needs to be catched then return result immediately for null or empty list.
6. Moved misplaced class variable inside the method that uses it.

BMS-126

Reviewer: Crisjaira Villarino (post-commit)
Code cleanup
1. Changed call to size() to isEmpty()
2. Returned result immediately instead of using a temporary variable
3. Merged if statements
4. Moved else beside }
5. Moved comments in a different line from code.
6. Used continue statement for null object and use else if to simplify the for loop
7. Removed unnecessary parenthesis
8. Used !booleanVariable instead of booleanVariable == false in if statement
9. Log original exception instead of calling printStackTrace()

BMS-126

Reviewer: Crisjaira Villarino (post-commit)
Code cleanup
1. Removed unnecessary parenthesis
2. Added isEmpty() to avoid using size in checking for empty list

BMS-126

Reviewer: Crisjaira Villarino (post-commit)
Code cleanup
1. Corrected error message in catch statements
2. Simplified block statements into one or more methods
3. Moved else beside }

BMS-126

Reviewer: Crisjaira Villarino (post-commit)