Added tryCatch clauses to all plots and validation of the levels
parameter.