fix lang.exists() corner case and add exists(), getObject() etc. tests, fixes #16291