Add code to validate options