Added exceptions for input values