Newbie Coder - "Error at Null" trying to save script

Newbie Coder - "Error at Null" trying to save script

Hi, extremely new to coding in deluge (or coding at all). I'm working on a dependent dropdown function that takes 3 dropdowns and narrows down options based on user entry. 

This is what code I have, and every time I try to save it in a workflow I get "error at null". I've looked up the error but documentation on it is non-existent (that I can find anyway), and it seems it happens in multiple circumstances based on prior community posts. 

Weakness, Theme, and Key_Lift are the field names
  1. //On User input of Theme
  2. Weakness_Lookup = Weakness;
  3. Key_Lift_Lookup = Key_Lift;
  4. Theme_Lookup = Theme;
  5. if(input.Weakness_Lookup == null && input.Key_Lift_Lookup == null)
  6. {
  7. fet = Exercise_Weaknesses[Theme == input.Theme];
  8. Weakness:ui.add(fet.ID.getall());
  9. Key_Lift:ui.add(fet.ID.getall());
  10. }
  11. if(input.Weakness_Lookup != null && input.Key_Lift_Lookup == null)
  12. {
  13. n = input.Weakness_Lookup;
  14. fet = Exercise_Weaknesses[Theme == input.Theme && Weakness == input.Weakness];
  15. Key_Lift:ui.add(fet.ID.getall());
  16. }
  17. if(input.Weakness_Lookup == null && input.Key_Lift_Lookup != null)
  18. {
  19. k = input.Key_Lift_Lookup;
  20. fet = Exercise_Weaknesses[Theme == input.Theme && Key_Lift == input.Key_Lift];
  21. Weakness:ui.add(fet.ID.getall());
  22. }
What is wrong with the code?

The goal is basically a filter for exercises a strength coach might use when developing a workout program for an athlete or team. The initial idea is to have an output that will populate automatically after the filters are selected. I want to develop it further but need an initial proof.

I have no idea about syntax or anything since I find Zoho's deluge documents to be...well unclear and fragmented at best. VBA for excel is much better documented and I can still barely use that if my life depends on it.