Refactor of semantic check

Returning a Boolean required a dependency to the concrete visitor. By
changing the retun type to a ValidationResult this dependency is no
longer required.