Abstracted method for checking if email belongs to student or instructor. Fixed indentation