Added semantic validation: all paths must return a value