Check for valid codeSnippet.