Fix undefined
Change if selected series is null