Added valid check before fetching sheets