Fix potential NPE due to race between table creation and schema fetching

JAVA-320