Only validate route handlers if they are specified