Fixed error: invalid argument in foreach when attempting to list people for an empty department.