Added constructor parameter check and new assert statement

Assert statement added in inMap() method