Add basic type constraints
Fix warning