Add type conversions to nullable and optional