Added exception handling to parameters