Added dictionary contains key check