Added Validation Check for indexing