Fix undefined checks.