Duplicating the note I just added to an outdated version: why not go for

$alias['reference'] = ( trim( $alias['reference']  ) !== '' ) ? $alias['reference'] : false;