Optimize Lua filters and features checks
Replaced direct null check of Lua filters and features with dedicated methods for a cleaner and efficient handling. This helps to avoid unnecessary function calls or computations when there are no Lua actions - either filters or features. The change improves the code's readability and application performance.