fix npe

fix npe while importing grades