throw error if arguments cannot be converted to prolog values