Revert "Properly check for a given $templates array and its values"

This reverts commit 0570285ba5f4e1ba7d6a4191f847518e6694adcc.