Use constructor instead of typeof