Added if statement in case students array empty