handling erroneous grade strings