Inconsistent validation of AIAMap
In most functions that take in a map, we validate whether it is an AIAMap and throw an error if it is not. This has ressulted in a lot of repeated code and inconsistency. We should have a decorator that handles this for us.