Added optional type support