Removed null check and added try get value for dictionary access