Web-app:Added a check if department selected exists