Fix a null ptr when schema version list is empty.