Slot value setting as None

Hi, I am facing a problem while setting slots as custom actions. The type of my slot is float but the slot value is always set as None.

from typing import Any, Text, Dict, List from rasa_sdk.events import SlotSet from rasa_sdk import Action, Tracker from rasa_sdk.executor import CollectingDispatcher

class ActionHelloWorld(Action):

def name(self) -> Text:
     return "action_hello_world"

def run(self, dispatcher: CollectingDispatcher,
         tracker: Tracker,
         domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

    parameter = tracker.get_slot('parameter')
    float_parameter= parameter
    print(float_parameter)
    type(float_parameter)
    if float_parameter:

       dispatcher.utter_message(text='The mutation rate is:' '%f' %float_parameter)
       

    else:
         dispatcher.utter_message(text= "No mutation rate")

    return []

slots:

parameter:

type: float

min_value: -100.0

max_value: 100.0

mappings:

- type: custom

The actions.py file is just printing None and the if loop only executes the else part.

I am new in Rasa, I really need help.