None has no element, but there is an availability line

Hi
Does anyone know why I keep getting the error below?
I added the availability line but the error stays

    - name: "Solax Local AC Frequency"
      unique_id: solax_local_ac_frequency
      state: >-
        {{ state_attr('sensor.solax_local', 'Data')[50] | float(0) }}
      unit_of_measurement: "Hz"
      device_class: frequency
      icon: mdi:music-clef-treble
      availability: "{{ state_attr('sensor.solax_local', 'Data')[50] is not none }}"

* TemplateError('UndefinedError: None has no element 50') while processing template 'Template<template=({{ state_attr('sensor.solax_local', 'Data')[50] | float }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.solax_local_ac_frequency'

when I execute the availability line in the template editor, the result is: “True” so it looks correct?!