[COMPDICT] Implement dict check for CompositeDict

This patch implements the composite_dict_check API for
composite dictionaries.

Minor: Lookup error and lookup failure are not differentiated.

Signed-off-by: Vidhoon Viswanathan <vidhu2366@gmail.com>