Refined PMDx for better type safety.