Making fluent API type-safe