This condition is not possible? Delete this line. To avoid the "unused variable" warning, use str or lose it. Do not call getObjectValue_withoutNull() twice for nothing.