Move this after the if to avoid an extra allocation.