Adding error checking for value param in set option