Added some errorhandling when creating a student