Optional types for Prolog