added validation for remove action in media module