Check if the element is valid
The error code the element. ErrorCode.NONE means that the element is valid
Check if the element is valid