Using typeof properly