update docs and added checks for non-existent variables for createCollection