Prevent an error, when using |first and |last when not used on an array.