Define new function ExistsResource that is similar to GetResource but
returns a boolean. Also fix typo in error message in GetResource