if the name and address of the person are unknown to him, and
if the person declines to give his name and address, or if there is reason to doubt the accuracy of the name and address, if given.
(2)
A person arrested under this section may be detained until his name and address have been correctly ascertained:
Provided that no person so arrested shall be detained longer than may be necessary for bringing him before a Magistrate, except under the order of a Magistrate for his detention.