Check arguments passed to publish function