Type checking tweaks