cleaned up argument validation for publish api