added validation for add joke and add photo