Utiity class to throw exceptions on a certain condition.