Fixes issue where a trim() was performned on what could be an array generating a warning.