Fixed the check on object available in cache