You can probably swap the check here to avoid the method call when not needed