Inline isResource function.