How to get type of archive whether it is post or date or category archive?

Use just the functions, not the object properties:

if ( is_post_type_archive() or is_date() )

There are many conditional functions (returning TRUE or FALSE) for exactly these cases.