make null check first
parseInt shouldn't be inline