validate various function args using assert