This method looks generic (takes generic input parameters) however, throws a very specific exception (validate for true or false)

Please refactor the same (and have pramod do a review of the same)