Check for null alias to avoid NPE