Don't expose that empty intmaps are just NULL in the API
factor out compile logic